package com.timberwood.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="Category")
public class Category {
	
	private int categoryID;
	private String categoryName;
	private Set<Products> products = new HashSet<Products>();
	
	public Category(){
	}
	
	public Category(String categoryName) {
		this.categoryName = categoryName;
		}
		 
	public Category(String categoryName, Set<Products> products) {
		this.categoryName = categoryName;
		this.products = products;
	}

	
	@Id
	@GeneratedValue
	@Column(name="CategoryID")
	public int getCategoryID() {
		return categoryID;
	}
	public void setCategoryID(int categoryID) {
		this.categoryID = categoryID;
	}
	
	@Column(name="CategoryName")
	public String getCategoryName() {
		return categoryName;
	}
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	
	
	public Set<Products> getProducts() {
		return products;
	}
	public void setProducts(Set<Products> products) {
		this.products = products;
	}
	
}
